using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using THSLib;using THSERP.BaseProvider;

namespace THSERP.Modules.Report
{
    public partial class RP014 : ReportForm
    {
        public RP014()
        {
            InitializeComponent();
        }

        private void fld_btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void RP014_Load(object sender, EventArgs e)
        {
            fld_dgcICRP014Transfers.Screen = this;
            fld_dgcICRP014Transfers.InitializeControl();

            fld_btnApply_Click(new object(), new EventArgs());
        }

        private void fld_btnApply_Click(object sender, EventArgs e)
        {
            DateTime fromDate = Convert.ToDateTime(fld_dteSearchFromICTransferDate.EditValue);
            DateTime toDate = Convert.ToDateTime(fld_dteSearchToICTransferDate.EditValue);
            DataSet ds = new ICTransfersController().GetDataSet(GenerateSearchQuery(THSUtil.GetTableNameFromBusinessObjectType(typeof(ICTransfersInfo))));
            if (ds.Tables.Count > 0)
            {
                fld_dgcICRP014Transfers.DataSource = ds.Tables[0];
                fld_dgcICRP014Transfers.RefreshDataSource();
            }
        }
    }
}